<template>
  <div style="width: 100%; height: 550px">
    <iframe id="mapPage" :src="src" width="100%" height="100%" frameborder="0">
    </iframe>
  </div>
</template>
<script>
export default {
  name:"onekit-openlocation",
  data() {
    return {
      src: "",
    };
  },
  methods: {},
  beforeMount() {
    const latitude = this.$route.query.latitude;
    const longitude = this.$route.query.longitude;
    let name = this.$route.query.name;
    let address = this.$route.query.address;
    if (name === undefined && address === undefined) {
      name = " ";
      address = " ";
    } else if (name === undefined) {
      name = " ";
    } else if (address === undefined) {
      address = " ";
    }

    this.src = `https://apis.map.qq.com/tools/poimarker?type=0&marker=coord:${latitude},${longitude};title:${name};addr:${address}&key=AMZBZ-DASWF-DQTJH-J2TYD-FLGAJ-JVB7F&referer=weixin2vue_map`;
  },
  mounted() {},
};
</script>
